<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>元素选择器</title>
		<style>
			*{
				font-size: 14px;
				font-family: "微软雅黑";
			}
			
			
			div.wh{
				border: 1px solid red;
				width: 150px;
				height: 100px;
				margin: 5px 20px 5px 40px;
				text-align: center;
				line-height: 100px;
				float: left;
			}
			
			#king{
				width: 1000px;
				border: 1px solid red;
				height: 100px;
				margin: 5px 20px 5px 40px;
				text-align: center;
				line-height: 100px;
				color: red;
				font-weight: bold;
			}
			
			#container{
				width: 1100px;
				height: auto;
				margin: 20px auto;
				overflow: hidden;
				border: 3px green solid;
			}
		</style>
	</head>
	<body>
		
		<div id="container">
			<div id="king">
				刘备
			</div>
			<div class="wh">
				关羽
			</div>
			<div class="wh">
				张飞
			</div>
			<div class="wh">
				赵云
			</div>
			<div class="wh">
				马超
			</div>
			<div class="wh">
				黄忠
			</div>
		</div>
		
	</body>
	<!--Step1:导入jquery-->
	<script type="text/javascript" src="../../../js/jquery-1.4.1.js" ></script>
	<script>
		//得到所有的标签个数
		var all = $("*");
		console.log(all.length);
		
		//可以遍历得到具体是什么  备注：此时object是js对象
		all.each(function(index,object){
			console.log("下标：["+index+"],对象["+object.nodeName+"]");
		});
		
	</script>
</html>
